# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=firectl
pkgver=0.2.0
pkgrel=11
pkgdesc="command-line tool to run Firecracker microVMs"
url="https://github.com/firecracker-microvm/firectl"
arch="x86_64 aarch64" # blocked by firecracker
license="Apache-2.0"
depends="firecracker"
makedepends="go"
source="https://github.com/firecracker-microvm/firectl/archive/v$pkgver/firectl-$pkgver.tar.gz"
options="!check" # the tests require a kernel image to be present

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make
}

package() {
	install -Dm755 firectl -t "$pkgdir"/usr/bin
}

sha512sums="
cc463015ea31f1bc31729824a35a69ddafc72dd1f83b91620d6476634c12a22b19cf8f0511b5d5d6c9644eef11813a9b05ed2e92693df37ab82ec4d6928eeea8  firectl-0.2.0.tar.gz
"
